/*!
 @header NSString+Hash.h
 @abstract 加密相关
 @author BruceHu
 @version 1.00 2020/08/31 Creation
 */

#import <Foundation/Foundation.h>

@interface NSString (Hash)
/*!
 @property
 @abstract md5
 */
@property (readonly) NSString *md5String;

/*!
 @property
 @abstract sha1
 */
@property (readonly) NSString *sha1String;

/*!
 @property
 @abstract sha256
 */
@property (readonly) NSString *sha256String;

/*!
 @property
 @abstract sha512
 */
@property (readonly) NSString *sha512String;

/*!
 @method
 @abstract sha1加密算法
 @discussion sha1加密算法
 @param key 密钥/盐值
 @return 回调
 */
- (NSString *)hmacSHA1StringWithKey:(NSString *)key;

/*!
 @method
 @abstract sha256加密算法
 @discussion sha256加密算法
 @param key 密钥/盐值
 @return 回调
 */
- (NSString *)hmacSHA256StringWithKey:(NSString *)key;

/*!
 @method
 @abstract sha512加密算法
 @discussion sha512加密算法
 @param key 密钥/盐值
 @return 回调
 */
- (NSString *)hmacSHA512StringWithKey:(NSString *)key;

@end
